home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Columns.h
-
- Contains: xxx put contents here xxx
-
- Written by: Essam Zaky
-
- Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <3> 1/5/94 EZ don't compile if txtnMultiFrames compilation var is not defined
- <2> 1/4/94 EZ clean up
- <1> 1/4/94 EZ first checked in
-
- */
-
- #ifdef txtnMultiFrames
-
- #ifndef _Columns_
- #define _Columns_
-
- #ifndef _ToolBoxDump_
- #include "ToolBoxDump.h"
- #endif
-
- #ifndef _TextensionCommon_
- #include "TextensionCommon.h"
- #endif
-
- #ifndef _Array_
- #include "Array.h"
- #endif
-
- #ifndef _Pages_
- #include "Pages.h"
- #endif
-
- //***************************************************************************************************
-
-
- class CColumnarFrames : public CPageFrames {
- public:
- CColumnarFrames();
-
- void IColumnarFrames();
-
- //•override
- virtual void SetTextFrameSize(const LongPoint* newSize, CDisplayChanges* changes = nil, long frameNo = 0);
-
- #ifdef txtnScal
- virtual void GetTextFrameSize(LongPoint* theSize, Boolean scaled = true, long frameNo = 0) const;
-
- virtual void SetScale(Point numer, Point denom);
-
- virtual void GetAbsTextFrame(long frameNo, TxtnLongRect* absRect, Boolean scaled = true) const;
- #else
- virtual void GetTextFrameSize(LongPoint* theSize, long frameNo = 0) const;
-
- virtual void GetAbsTextFrame(long frameNo, TxtnLongRect* absRect) const;
- #endif
-
- virtual void InvalFramePart(long frameNo, TFrameEditFlags invalFlags, long invalMessage = 0
- , RgnHandle theClip = nil);
-
- virtual short GetLineFormatWidth(long lineNo) const;
- virtual short GetLineMaxWidth(long lineNo) const;
-
- virtual void SectFrames(const Rect* theRect, CSectFrames* sectedFrames) const;
-
- virtual long Point2Frame(const LongPoint* thePt) const;
- //up to now, always return a value >= 0
-
- //•own members
- virtual long GetCountPages() const;
-
- void SectPages(const Rect* theRect, CSectFrames* sectedPages) const;
-
- inline void GetAbsPageTextFrame(long pageNo, TxtnLongRect* absRect) const
- {CPageFrames::GetAbsTextFrame(pageNo, absRect);}
-
- void GetPageTextFrame(long pageNo, Rect* theRect) const;
-
- inline void GetAbsPageFrame(long pageNo, TxtnLongRect* absRect) const
- {CPageFrames::GetAbsFrameRect(pageNo, absRect);}
-
- void GetPageFrame(long pageNo, Rect* theRect) const ;
-
- void SetCoulmnsInfo(short columnsPerPage, short columnGutter, CDisplayChanges* changes = nil);
- void GetCoulmnsInfo(short* columnsPerPage, short* columnGutter) const;
-
- long Column2Page(long* columnNo) const;
-
- protected:
- short fColumnsPerPage;
-
- short fColumnWidth;
-
- short fColumnGutter;
-
- #ifdef txtnScal
- short fScaledColumnWidth;
- short fScaledColumnGutter;
- #endif
-
- //•own members
-
- private:
- void CalcColumnWidth();
-
- #ifdef txtnScal
- void CalcScaledVals();
- #endif
- };
- //*************************************************************************************************
-
-
- #endif //_Columns_
-
- #endif //txtnMultiFrames